﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PowerControl
{
    public abstract class Positionable
    {
        private Position pos;

        public Positionable()
        {
            this.pos = new Position();
        }

        public Position Position
        {
            get
            {
                return pos;
            }
            set
            {
                this.pos = value;
            }
        }

        public double getDistanceFrom( Positionable b )
        {
            return Math.Sqrt(   Math.Pow((this.Position.X - b.Position.X), 2.0d) +
                                Math.Pow((this.Position.Y - b.Position.Y),2.0d)
                                
                            );
        }
    }
}
